package chapter05._01_inheritance;

/**
 * @Version:
 * @Description: 对protected修饰符进行测试
 * @LastDate: 2020/9/28
 */
public class ProtectedTest extends Test01 {

    /*public void test() {
        System.out.println("ProtectedTest");
    }*/

    public static void main(String[] args) {
        ProtectedTest t2 = new ProtectedTest();
        t2.test();//同包子类自己可以直接调用protected method
    }
}

class Test01 {

    protected void test() {
        System.out.println("Test01");
    }
}

